<template>
  <div class="content-box intro-y">
    <hBase :args="args">
      <template #parts>
        <el-table-column prop="equtCode" label="设备编号" width="180"/>
        <el-table-column prop="equtName" label="设备名称" width="180"/>
        <el-table-column prop="stopFlag" align="center" label="停用" width="80">
          <template #default="scope">
            <el-checkbox v-model="scope.row.stopFlag" size="large" disabled/>
          </template>
        </el-table-column>
        <el-table-column prop="installCapacity" label="装机容量" width="180"/>
        <el-table-column prop="equtState" label="机组状态" width="180"/>
        <el-table-column/>
      </template>
      <template #edit="{ init, close }">
        <edit :init="init" @close="close"></edit>
      </template>
    </hBase>
  </div>
</template>

<script setup>
import {onMounted, computed} from "vue";
import hBase from "../base/hBase.vue";
import * as $api from "@/api/api.js";
import edit from "./Edit.vue"
import {EquipmentDelete, EquipmentQueryAll} from "@/api/api.js";

onMounted(() => {
  console.log($api.BATeacherQueryCondition); // 使用 globalProperties 上的 $api
});
const args = computed(() => {
  return {
    search: $api.EquipmentQueryAll,
    remove: $api.EquipmentDelete,
    key: (e) => {
      return {
        plantKey: "",
        userKey: "",
        key: e.equtKey
      };
    },
  };
});
</script>

<style></style>